<?php
/* @var $this ArticleController */
/* @var $model Article */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'article-form',
	'enableAjaxValidation'=>false,
)); ?>

  <p class="note">
    Fields with <span class="required">*</span> are required.
  </p>

  <?php echo $form->errorSummary($model); ?>

  <div class="row">
  <?php echo $form->labelEx($model,'title'); ?>
  <?php echo $form->textField($model,'title',array('size'=>60,'maxlength'=>500)); ?>
  <?php echo $form->error($model,'title'); ?>
  </div>

  <div class="row">
  <?php echo $form->labelEx($model,'description'); ?>
  <?php echo $form->textArea($model,'description',array('rows'=>6, 'cols'=>50)); ?>
  <?php echo $form->error($model,'description'); ?>
  </div>

  <div class="row">
    <?php echo $form->labelEx($model,'content'); ?>
  
    <?php
    $this->widget('ext.ckeditor.CKEditorWidget',array(
            "model"=>$model,
            "attribute"=>'content',
            "config" => array(
              "height"=>"300px",
    ),
    ));
    ?>
  </div>



  <div class="row">
  <?php echo $form->labelEx($model,'fileID'); ?>
  <?php echo $form->textField($model,'fileID'); ?>
  <?php echo $form->error($model,'fileID'); ?>
  </div>


  <div class="row">
  <?php echo $form->labelEx($model,'type'); ?>
  <?php echo $form->radioButtonList($model, 'type', array('1' => Yii::t('default', 'Tư vấn'), '2' => Yii::t('default', 'Khuyến mãi'), '3' => Yii::t('default', 'Công trình mẫu')), array('separator'=>'', 'template'=>' {input} {label} ')); ?>
  </div>

  <div class="row">
  <?php echo $form->labelEx($model,'sort'); ?>
  <?php echo $form->textField($model,'sort'); ?>
  <?php echo $form->error($model,'sort'); ?>
  </div>

  <div class="row">
  <?php echo $form->labelEx($model,'enabled'); ?>
  <?php echo $form->radioButtonList($model, 'enabled', array('1' => Yii::t('default', 'Có'), '0' => Yii::t('default', 'Không')), array('separator'=>'', 'template'=>' {input} {label} ')); ?>
  </div>

  <div class="row buttons">
  <?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
  </div>

  <?php $this->endWidget(); ?>

</div>
<!-- form -->
